<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta charset="UTF-8">
  <title><?= empty($this->pageTitle) ? Yii::app()->name : $this->pageTitle ?></title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="/public/lib/bootstrap/dist/css/bootstrap.min.css">
  <link rel="stylesheet" href="/public/lib/font-awesome-4.0.3/css/font-awesome.min.css">
  <link rel="stylesheet" href="/public/css/site.css">
  <script src="/public/lib/jquery/jquery.min.js"></script>
  <script src="/public/js/main.js"></script>
</head>
<body>
<div class="container vertical-center">
  <aside class="text-right">
    <?php
    switch (Yii::app()->user->getState('type')) {
      case 1:
        ?>
        <a href="<?= Yii::app()->createUrl('student/index') ?>">个人中心</a>
        <?= Yii::app()->user->getState('name') ?>
        <span class="label label-info">学生</span>
        <a href="<?= Yii::app()->createUrl('student/logout') ?>"><i class="fa fa-power-off"></i> 注销</a>
        <?php
        break;
      case 2:
        ?>
        <a href="<?= Yii::app()->createUrl('teacher/index') ?>">个人中心</a>
        <?= Yii::app()->user->getState('name') ?>
        <span class="label label-info">教师</span>
        <a href="<?= Yii::app()->createUrl('teacher/logout') ?>"><i class="fa fa-power-off"></i> 注销</a>
        <?php
        break;
      case 3:
        ?>
        <a href="<?= Yii::app()->createUrl('admin/index') ?>">个人中心</a>
        <?= Yii::app()->user->getState('name') ?>
        <span class="label label-info">管理员</span>
        <a href="<?= Yii::app()->createUrl('admin/logout') ?>"><i class="fa fa-power-off"></i> 注销</a>
        <?php
        break;
        default:
        ?>
        <a href="<?= Yii::app()->createUrl('site/login') ?>">登录</a>
        <a href="<?= Yii::app()->createUrl('site/register') ?>">注册</a>
        <?php
        break;
    }
    ?>
  </aside>
  <div class="jumbotron">
    <h2 class="title"><?= Yii::app()->name ?></h2>

    <p>本系统采用 <i class="fa fa-html5"></i>HTML5和 <i class="fa fa-css3"></i>CSS3进行开发，建议您使用Chrom浏览器进行浏览</p>
  </div>
  <div class="col-md-9 no-padding-left">
    <?= $content ?>
  </div>
  <div class="col-md-3 no-padding-right">
    <?php $this->widget('RightWidget') ?>
  </div>
</div>
<footer class="text-center">Copyright &copy;2014</footer>
</body>
</html>